home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: HELP...HELP
- Date: Sat, 13 Apr 96 15:44:31 GMT
- Organization: none
- Message-ID: <829410271snz@genesis.demon.co.uk>
- References: <316EF6A1.41C6@ift.ulaval.ca>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <316EF6A1.41C6@ift.ulaval.ca>
- baklouti@ift.ulaval.ca "Ferid Baklouti" writes:
-
- >Hello everyone,
- >
- >imagine this command under a unix system :
- >
- > program1 < file | program2 | program3 > file.results
- >
- >i want the "program2" to be able to detect the name of "file" given on
- >the standard input <stdin> to the program1.
-
- Not possible. The best you could hope to do is perform a find like scan
- over the entire filesystem to see if you could find something that matches.
-
- This is a pure Unix question and has nothing to do with the standard C
- language - ask in comp.unix.programmer.
-
- >in the file stdio.h, I only find the things below which doesn't contain
- >the name of the file.
-
- That's because it doesn't know the name of the file and indeed doesn't
- need to know it. The file could have no filename or multiple filenames
- (links). If you need a filename require it to be passed as a command line
- argument.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-